import Vue from 'vue'
import tinymce from 'tinymce'
import VueTinymce from '@packy-tang/vue-tinymce'
import XlTable from '@/components/XlTable/index.vue'
import XlSearchForm from '@/components/XlSearchForm/index.vue'
import ElementUI from 'element-ui'
import App from './App'
import store from './store'
import router from './router'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import 'element-ui/lib/theme-chalk/index.css'

import 'tinymce/skins/ui/oxide/skin.min.css'
import 'tinymce/themes/silver'
import 'tinymce/plugins/link' // 链接插件
import 'tinymce/plugins/image' // 图片插件
import 'tinymce/plugins/media' // 媒体插件
import 'tinymce/plugins/table' // 表格插件
import 'tinymce/plugins/lists' // 列表插件
import 'tinymce/plugins/quickbars' // 快速栏插件
import 'tinymce/plugins/fullscreen' // 全屏插件
import 'tinymce/icons/default/icons'
import '../public/tinymce/langs/zh_CN'

import '@/styles/index.scss' // global css
import '@/icons' // icon
import '@/permission' // permission control

Vue.use(ElementUI)
Vue.use(VueTinymce)
Vue.component('xl-table', XlTable)
Vue.component('xl-search-form', XlSearchForm)

Vue.prototype.$tinymce = tinymce

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: (h) => h(App)
})
